package com.ming.Service;

import com.ming.Bean.Student;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:weiming
 * @Date:2020/11/16
 */
@CacheConfig(cacheNames = "student")
@Service
public interface StudentService {

    List<Student> getStduents();

    @Cacheable(key = "#p0")
    Student getStuById(int id);
}
